<template>
  <div>
    <div id="ib">
      <div id="middle">
        <input type="text" placeholder="请输入驾校或教练" @input="search" />
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "jiaolian",
  data() {
    return {
      r: [
        '1646810822238379084', '11870155657902295088', '115051865197135830085',
        '114355443656802678094', '13539322705069824084', '19218815320171948085',
        '115280404738127488089', '13736386147165167090', '112213196528966382091',
      ],
      pan: false,
    };
  },
  methods: {
    search() {
       this.pan =false
      if (!this.pan) {
        for (var i = 0; i < this.r.length; i++) {
          this.axios
            .get(
              `/api/web/v3/search/search.htm?_r=${this.r[i]}&name=%E5%AE%B6&cityCode=410100&latitude=34.826891468358&longitude=`
            )
            .then((res) => {
              this.pan = res.data.success;
              console.log(this.pan);
              console.log(res.data);
            });
            console.log(i);
        }
      }
    },
  },
  created() {
    console.log("我已经创建");
  },
};
</script>
<style scoped>
#ib {
  widows: 100%;
  height: 6.7vh;
  background: rgb(238, 238, 238);
}
#middle {
  width: 73%;
  margin: 0 auto;
  height: 3.3vh;
}
#middle > input {
  width: 100%;
  margin: 1.5vh auto;
  height: 3.3vh;
}
</style>
